package com.cloudfun.campusshare.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/4/28 17:49
 * @description :
 */
@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "wash_point_concrete_position")
public class WashPointConcretePositionEntity extends BaseEntity{
    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(name = "id", unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

    @Column(name = "wash_point_id",  columnDefinition = ("varchar(40) not null comment '洗衣点id'"))
    private String washPointId;

    @ManyToOne
    @JoinColumn(name = "wash_point_id", insertable = false, updatable = false)
    private WashPointEntity washPointEntity;

    @Column(name = "building", columnDefinition = ("varchar(64) not null comment '楼栋'"))
    private String building;

    @Column(name = "floor",  columnDefinition = ("varchar(128) not null comment '层数'"))
    private String floor;

    @Column(name = "room",  columnDefinition = ("varchar(64) not null comment '房间号'"))
    private String room;


}
